﻿using ET.Monitor.DAL;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ET.Monitor.Model
{
    public class TextBoxModel
    {
        string id = "";
        DateTime st = new DateTime();
        DateTime et = new DateTime();
        int num = 0;
        public TextBoxModel(string boxId, DateTime sTime, DateTime eTime, int count)
        {
            id = boxId;
            st = sTime;
            et = eTime;
            num = count;
        }
        public TextBoxModel(string boxId)
        {
            id = boxId;
        }
        string[] pointName = null;
        public TextBoxModel(string id, string[] name)
        {
            this.id = id;
            pointName = name;
        }
        TextBoxDAL dal = new TextBoxDAL();

        #region 一段时间电压
        double[] voltage;

        public double[] Voltage
        {
            get { return dal.GetVoltage(id, st, et, num); }
            set { voltage = value; }
        }
        #endregion

        #region 一段时间电流
        double[] current;

        public double[] Current
        {
            get { return dal.GetCurrent(id, st, et, num); }
            set { current = value; }
        }
        #endregion

        #region 一段时间频率
        double[] frec;

        public double[] Frec
        {
            get { return dal.GetFrec(id, st, et, num); }
            set { frec = value; }
        }
        #endregion

        #region 电站下汇流箱
        DataTable dtBox;

        public DataTable DtBox
        {
            get
            {
                return dal.GetBox(id);
            }

            set
            {
                dtBox = value;
            }
        }
        #endregion

        #region 汇流箱详细信息
        ArrayList listBox;

        public ArrayList ListBox
        {
            get
            {
                return dal.GetBoxPointInfo(id);
            }

            set
            {
                listBox = value;
            }
        }
        #endregion

        #region 获取实施测电集合数据
        List<double[]> list;

        public List<double[]> List
        {
            get
            {
                return dal.GetRealVal(id, pointName);
            }

            set
            {
                list = value;
            }
        }
        #endregion

        #region 电站趋势 离散率
        double[][] dispersionRatio;

        public double[][] DispersionRatio
        {
            get { return dal.GetDispersionRatioLine(id, st, et, num); }
            set { dispersionRatio = value; }
        }
        #endregion

        #region 组串电流
        double[][] branchcurrent;

        public double[][] Branchcurrent
        {
            get { return dal.GetBranchcurrent(id, st, et, num); }
            set { branchcurrent = value; }
        }
        #endregion
    }
}
